const pi = Math.PI;

class Circle {

  constructor(radius) {
    this.r = radius;
  }
  
  get diameter() {         //直径
    return 2 * this.r;
  }
  
  get circumference() {
    return pi * 2 * this.r;    //周长
  }
  get area() {
    return pi * this.r * this.r;  //面积
  }
  
}

module.exports = Circle;
console.log(module);
